﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Foundation.ObjectHydrator.Interfaces;

namespace Foundation.ObjectHydrator.Generators
{
    public class IntegerGenerator:IGenerator
    {
        Random random;

        public int MinimumValue { get; set; }
        public int MaximumValue { get; set; }

        public IntegerGenerator()
            : this(0, 100)
        { }

        public IntegerGenerator(int minimumValue, int maximumValue)
        {
            MinimumValue = minimumValue;
            MaximumValue = maximumValue;

            random = new Random();
        }

        public object Generate()
        {
            return random.Next(MinimumValue, MaximumValue);
        }
    }
}
